﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinQModel.Abstract;
using LinQModel.Entities;
using System.Data.Linq;

namespace LinQModel.Concrete
{
    public class SQLTeachersRepository : ITeachersRepository 
    {
        private Table<Teacher> teachersTable;
        public SQLTeachersRepository(string connectionString)
        {
            teachersTable = (new DataContext(connectionString)).GetTable<Teacher>();
        }

        public IQueryable<Teacher> Teachers
        {
            get { return teachersTable; }
        }
    }
}
